package com.springboot.sba.D4_Servlet;

import org.apache.tomcat.util.digester.SetPropertiesRule;

import javax.servlet.ServletContext;
import javax.servlet.ServletRequest;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class ListenerTest implements ServletRequestListener {
    private static int count = 0;

    public void requestDestroyed(ServletRequestEvent sre) {
        //System.out.println("------listener-- destroy--------");

    }

    public void requestInitialized(ServletRequestEvent sre) {
        // System.out.println("---------listener-------访问次数" + count);
        // count++;

    }
}
